package cn.iecas.springboot.convert;

import cn.iecas.springboot.bean.PermissionBean;
import cn.iecas.springboot.vo.PermissionTreeVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 权限对象属性转换器
 *
 * @author ch
 * @date 2021-10-14
 **/
@Mapper
public interface PermissionConvert {
    PermissionConvert INSTANCE = Mappers.getMapper(PermissionConvert.class);

    /**
     * Permission 转换成 PermissionTreeVo 对象
     *
     * @param permission
     * @return
     */
    PermissionTreeVo entityToTreeVo(PermissionBean permission);
}
